<?php
//article images
$image_article = base_url() . 'images/layout-images/article.png';
$title_article = 'article';
$alt_article = 'article';
// media images
$image_media = base_url() . 'images/layout-images/media.png';
$title_media = 'media';
//user images
$image_user = base_url() . 'images/layout-images/users.png';
$title_user = 'user';
$alt_user = 'user';
//add article images
$image_addarticle = base_url() . 'images/layout-images/addarticle.png';
$title_add = 'article add';
$alt_user = 'user';

//about Natara joga
$img1 = array(
    'src' => 'images/helping.gif',
    'alt' => 'Panel image',
    'style' => 'float:right;height:163px;'
);
$img2 = array(
    'src' => 'images/kidsClass.gif',
    'alt' => 'Panel image',
    'style' => 'float:right;'
);
$text = "<div style='float:left; padding:10px; width:398px;text-align:justify;float: right;'></div><p style='margin: 0; text-indent:50px;'>Krama Yoga is a Cambodian NGO run by young men and women" .
        "who have changed their lives with yoga and now provide Kids" .
        "Yoga, Teen Yoga and Yoga Therapy classes for others.</p>";
$text.="<p style='margin: 0px; text-indent:50px;'>Krama Yoga is the organization that will ensure gainful and" .
        " fulfilling careers for the core team members, and for others" .
        "who are now growing up with yoga and can choose to pursue it as" .
        "a life path.  This NGO is the tangible outcome of these kids' " .
        "climb from poverty and trauma, to leaders of their community and artists of their own lives.</p>";
?>
<?php
//article images
$image_user = base_url() . 'images/user_images/user.png';
$title_user = 'User Management';
$alt_user = 'User Management';
// media images
$image_student = base_url() . 'images/user_images/students.png';
$title_student = 'Student Management';
//user images
$image_teacher = base_url() . 'images/user_images/teacher.png';
$title_teacher = 'Teacher Management';
$alt_teacher = 'Teacher Management';
//add article images
$image_sale = base_url() . 'images/user_images/sale.png';
$title_sale = 'Sale Management';
$alt_sale = 'Sale Management';
// image for class
$image_class = base_url() . 'images/user_images/class.png';
$title_class = 'Class Management';
//image for attentdent
$image_attendence = base_url() . 'images/user_images/attendance.png';
$title_attendence = 'Attendence Management';
//image for report
$image_report = base_url() . 'images/user_images/report.png';
$title_report = 'Report Management';
?>
<div style="width: 100%; height: auto; margin: 0 auto; margin-top: 10px; border: 0px solid #ccc;">    
    <div style="width: 37%; height: auto; float: right; border: 0px solid;padding: 2px 0px 0px 0px; text-align: justify; font-size: 13px; font-family: Verdana,Geneva,sans-serif; margin-top: 10px; font-weight: lighter;">
        <?php
        echo img($img2);
        echo img($img1);
        echo $text;
        ?>
    </div>
    <style type="text/css">
        table tr td div:hover{
            -moz-transition-duration: 0.8s;
            box-shadow: 2px 1px 5px;
        }
        p a{
            text-decoration: none;
        }
        table tr td div p a:hover{ color: brown;}
    </style>
    <fieldset style="float: left;argin: 0 auto;width:55%;height: auto;border: 1px #ccc solid; padding:20px 15px 20px 15px;-moz-border-radius:10px;">
        <legend align="center"><div  style="margin: 0 auto;width:100%;height: auto;border: 0px #ccc solid;text-align: center;font-size: 20px;color:#5C9416;">NataRaj Yoga Management</div></legend>
        <table style="background-color:#FFF; padding:3px; font-size: 12px;" border="0" align="center">

            <?php
            $admin = $this->session->userdata('user_type');
            if ($admin == '0') {// if user function as nomal user, they can see menu below
                ?>
                <tr style="height:100px;">
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center;"
                             <p><?php echo anchor('students/manager', img(array('src' => $image_student, 'title' => $title_student))); ?></p>
                            <p><?php echo anchor('students/manager', 'Studentd Management'); ?></p>
                        </div>
                    </td>
                    <td>
                        <div style="border:1px solid #5A8F15;margin-right:10px;text-align:center; padding: 0px 5px 0px 5px;" >
                            <?php
                            echo '<p>' . anchor('report/manager', img(array('src' => $image_report, 'title' => $title_report, 'width' => '60')));
                            echo '</p>';
                            echo '<p>' . anchor('report/manager', 'Report Management') . '</p>';
                            ?>
                        </div>
                    </td>

                </tr>
                <tr></tr><br/>

                <tr style="height:100px;">
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center;">
                            <p> <?php echo anchor('sale_management/manager', img(array('src' => $image_sale, 'title' => $title_sale, 'width' => '60'))); ?></p>
                            <p><?php echo anchor('sale_management/manager', 'Sale Management'); ?></p></div>
                    </td>
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center;">
                            <p><?php echo anchor('attendance/manager', img(array('src' => $image_attendence, 'title' => $title_attendence, 'width' => '60'))); ?></p>
                            <p><?php echo anchor('attendance/manager', 'Attendence Management'); ?></p></div>
                    </td>
                </tr>



                <?php
            } else {//this is condition if user as admin, show result below 
                ?>   

                <tr style="height:100px;">
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center; padding: 0px 5px 0px 5px;">

                            <?php
                            echo '<p>' . anchor('user/manager', img(array('src' => $image_user, 'title' => $title_user, 'width' => '60')));
                            echo '</p>';
                            ?>

                            <p><?php echo anchor('user/manager', 'User Management'); ?></p>
                        </div>
                    </td>
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center; padding: 0px 5px 0px 5px;">
                            <p><?php echo anchor('students/manager', img(array('src' => $image_student, 'title' => $title_student))); ?></p>
                            <p><?php echo anchor('students/manager', 'Student Management'); ?></p>
                        </div>
                    </td>
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center; padding: 0px 5px 0px 5px;">
                            <p><?php echo anchor('class_manager/manager', img(array('src' => $image_class, 'title' => $title_class))); ?></p>
                            <p><?php echo anchor('class_manager/manager', 'Class Management'); ?></p></div>
                    </td>
                </tr>
                <tr></tr><br/>

                <tr style="height:100px;">
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center; padding: 0px 5px 0px 5px;">
                            <p><?php echo anchor('teacher/manager', img(array('src' => $image_teacher, 'title' => $title_teacher))); ?></p>
                            <p><?php echo anchor('teacher/manager', 'Teacher Management'); ?></p></div>
                    </td>
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center; padding: 0px 5px 0px 5px;">
                            <p> <?php echo anchor('sale_management/manager', img(array('src' => $image_sale, 'title' => $title_sale, 'width' => '60'))); ?></p>
                            <p><?php echo anchor('sale_management/manager', 'Sale Management'); ?></p></div>
                    </td>
                    <td>
                        <div style="border: 1px solid #5A8F15;margin-right:10px; text-align:center; padding: 0px 5px 0px 5px;">
                            <p><?php echo anchor('attendance/manager', img(array('src' => $image_attendence, 'title' => $title_attendence, 'width' => '60'))); ?></p>
                            <p><?php echo anchor('attendance/manager', 'Attendence Management'); ?></p></div>
                    </td>
                </tr>

                <tr>
                    <td>
                        <div style="border:1px solid #5A8F15;margin-right:10px;text-align:center; padding: 0px 5px 0px 5px;" >
                            <?php
                            echo '<p>' . anchor('report/manager', img(array('src' => $image_report, 'title' => $title_report, 'width' => '60')));
                            echo '</p>';
                            echo '<p>' . anchor('report/manager', 'Report Management') . '</p>';
                            ?>
                        </div>
                    </td>
                </tr>
            <?php } ?>
        </table>
    </fieldset>
</div>